#ifndef FFMPEGEXTRA_EYERWASMBLOB_HPP
#define FFMPEGEXTRA_EYERWASMBLOB_HPP

#include <string>

#include "EyerWASMCommon/EyerWASMBuffer.hpp"

namespace Eyer
{
    class EyerWASMBlob
    {
    public:
        EyerWASMBlob(const std::string & blobUrl);
        ~EyerWASMBlob();

        int Open();
        bool IsOpen();
        int Close();

        int64_t Read(EyerWASMBuffer & buffer, int64_t pos, int64_t wantLen);

        int64_t GetFileSize();
    private:
        std::string m_blobUrl = "";
        int m_blobKey = 0;
        int64_t m_fileSize = 0;
    };
}

#endif //FFMPEGEXTRA_EYERWASMBLOB_HPP
